<?php
class Lead_EDO_Datatype_Field_Relation_BelongsTo
{
    public static function getValue($field)
    {
		
        $foreignKey = $field->getOwner()->getField($field->getForeignKey());
        if($foreignKey) {
            return $field->getOwner()->getHandler()->fetch($foreignKey, $field->getRelatedClass());
        }
                        
        
        /*
        $assocObj = $field->getOwner()->getHandler()->get($field->getRelatedClass());
		$assocObj->fetch($field->getOwner()->getField($field->getForeignKey()));
		return $assocObj;
		*/

        
        
    }
}
